def register_user_info():
    """
    注册用户信息
    :return:
    """
    user_info = {
        "name": input("name:").strip(),
        "age": input("age:").strip(),
        "sex": input("sex:").strip()
    }
    info_flag = True
    # 只要有值为空，代表信息有误
    for key, value in user_info.items():
        if value is None or '' == value:
            info_flag = False

    return info_flag, user_info


flag, info = register_user_info()
if flag:
    print(f"注册成功：{info}！")
else:
    print(f"信息有误：{info}！")
